package com.msmall.community.bbs.action.wml;

import com.msmall.base.action.WMLBaseAction;

public class BBSBaseAction extends WMLBaseAction{

	private static final long serialVersionUID = 6599859915979357491L;

	/**
	 * 当前版区ID
	 */
	protected Long boardId;
	/**
	 * 当前主题帖ID
	 */
	protected Long topicId;
	/**
	 * 当前回复ID
	 */
	protected Long threadId;

	/**
	 * 当前用户是否是当前版区的版主 
	 * Y:是 N:不是
	 */
	protected String isMaster;
	
	private String bbsToUrl;

	public void  isMaster(){
		/*
		List<Board> boards = (List)CacheFactory.getInstance().getCache(Constants.CACHE_NAME_COMMON).get(Constants.CACHE_KEY_BBS_BOARD_LIST);
		if(boards == null){
			BbsInitialize.refreshBoard();
			boards = (List)CacheFactory.getInstance().getCache(Constants.CACHE_NAME_COMMON).get(Constants.CACHE_KEY_BBS_BOARD_LIST);
		}
		Iterator it = boards.iterator();
		boolean tag = false;
		while(it.hasNext()){
			Board board = (Board)it.next();
			if(boardId.compareTo(board.getBoardId()) == 0){
				Set<Master> masters = board.getMasterCollection();
				Iterator mit = masters.iterator();
				while(mit.hasNext()){
					Master master = (Master) mit.next();
					if(getUsername().equals(master.getUsername())){
						setIsMaster("Y");
						tag = true;
						break;
					}
				}
				if(tag) break;
			}
		}
		if(!tag)
			setIsMaster("N");
			*/
	}

	public Long getBoardId() {
		return boardId;
	}

	public void setBoardId(Long boardId) {
		this.boardId = boardId;
	}

	public Long getTopicId() {
		return topicId;
	}

	public void setTopicId(Long topicId) {
		this.topicId = topicId;
	}

	public Long getThreadId() {
		return threadId;
	}

	public void setThreadId(Long threadId) {
		this.threadId = threadId;
	}

	public String getIsMaster() {
		return isMaster;
	}

	public void setIsMaster(String isMaster) {
		this.isMaster = isMaster;
	}

	public String getBbsToUrl() {
		return bbsToUrl;
	}

	public void setBbsToUrl(String bbsToUrl) {
		this.bbsToUrl = bbsToUrl;
	}

}
